
import './style.css';
import ico from './git.ico';
import printMe from './print.js';

function component() {
    let element = document.createElement('div');
    let btn = document.createElement('button');

    element.innerHTML = 'Hello webpack';
    element.classList.add('hello');

    btn.innerHTML = 'click and print!';
    btn.onclick = printMe;

    element.appendChild(btn);

    // let myIco = new Image();
    // myIco.src = ico;
    // element.appendChild(myIco);
    
    return element;
}

document.body.appendChild(component());